<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="utf-8">
<th:block th:replace="headfoot/head::head_common">引用公共的homefoot</th:block>
</head>

<body>
	<div class="container-fluid kj-form-container">
				<form
					id="optionForm"
					class="form-horizontal validate kj-form-container-content"
					role="form"
					method="post"
					action="/system/option/save"
				>
						
					<input type="hidden" id="id" name="id" th:value="${entity?.id}" />
					
					<div class="from-group row has-feedback kj-form-title-button-bar">
						<div class="col-md-7">
							<button
								type="button"
								class="btn btn-default btn-sm action-ajax-form kj-btn-save"
							>
								<i class="iconfont icon-baocun"></i>&ensp;保存
							</button>
							<button
								type="button"
								class="btn btn-default btn-sm action-close-tab kj-btn-cancel"
							>
								<i class="iconfont icon-guanbi"></i>&ensp;取消
							</button>
						</div>
						<div class="col-md-5">
							<label class="col-md-6 control-label kj-form-title-button-bar-label">负责人： <span
								th:text="${entity?.createUserId != null ? entity?.createUserId : ''}"></span>
							</label> <label class="control-label kj-form-title-button-bar-label">创建时间：
								<span th:text="${entity?.createDate != null ? #dates.format(entity?.createDate, 'yyyy-MM-dd HH:mm:ss') : #dates.format(new java.util.Date().getTime(), 'yyyy-MM-dd HH:mm:ss')}"></span>
							</label>
						</div>
					</div>

					<div class="card kj-form-container-card">
						<div class="card-header kj-form-container-card-header">
							<h4>
								<strong>参数项详情</strong>
							</h4>
						</div>
						<div class="card-body kj-form-container-card-body">
							<div class="form-group">
								<label class="col-md-2 control-label kj-form-container-content-label">参数项中文名</label>
								<div class="col-md-3 validateDiv">
									<input
										class="form-control input-sm kj-form-container-content-input"
										name="name"
										type="text"
										data-rule-required="true" 
										autocomplete="off"
										placeholder="参数项中文名"
										th:value="${entity?.name}" />
								</div>
								<label class="col-md-2 control-label kj-form-container-content-label">参数项英文名</label>
								<div class="col-md-3 validateDiv">
									<input
										class="form-control input-sm kj-form-container-content-input"
										name="enName"
										type="text"
										data-rule-required="true" 
										autocomplete="off"
										placeholder="参数项英文名"
										th:value="${entity?.enName}" />
								</div>
							</div>
							
							<div class="form-group">
								<label class="col-md-2 control-label kj-form-container-content-label">参数项值</label>
								<div class="col-md-3 validateDiv">
									<input
										class="form-control input-sm kj-form-container-content-input"
										name="value"
										type="text"
										data-rule-required="true" 
										autocomplete="off"
										placeholder="参数项值"
										th:value="${entity?.value}" />
								</div>
								 
								
								<label class="col-md-2 control-label kj-form-container-content-label">所属参数</label>
								<div class="col-md-3 validateDiv">
									<select
										class="form-control input-sm kj-form-container-content-input" data-rule-required="true"
										name="fkParameterId"
										th:value="${entity?.fkParameterId}"
									>
										<option value="">请选择</option>
										<option
											th:each="parameter : ${parameterList}"
											th:value="${parameter.id}"
											th:text="${parameter.name}"
											th:selected="${parameter.id == entity?.fkParameterId}">
										</option>
									</select>
								</div>
								
							</div>
							
							<div class="form-group">
								<label class="col-md-2 control-label kj-form-container-content-label">父参数</label><!-- 父参数项的所属参数 -->
								<div class="col-md-3 validateDiv">
									<select
										class="form-control input-sm kj-form-container-content-input"
										data-linkage="true"
										data-linkage-url="/system/option/getByPid"
										data-linkage-target="#fkParentOptionId"
									>
										<option value="">请选择</option>
										<option
											th:each="parameter : ${parameterList}"
											th:value="${parameter.id}"
											th:text="${parameter.name}"
											th:selected="${parameter.id == entity?.parentParameterId}">
										</option>
									</select>
								</div>
								
								<label class="col-md-2 control-label kj-form-container-content-label">父参数项</label>
								<div class="col-md-3 validateDiv">
									<select
										id="fkParentOptionId"
										class="form-control input-sm kj-form-container-content-input" 
										name="fkParentOptionId"
										th:data-value="${entity?.fkParentOptionId}">
									</select>
								</div>
								
							</div>
						</div>
					</div>
				</form>
	</div>

	<th:block th:include="headfoot/foot::form_foot">引用公共的homefoot</th:block>
	
</body>
</html>